package cc.sunni.sleeve.service;

import cc.sunni.sleeve.model.Banner;
import cc.sunni.sleeve.repository.BannerRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author jl
 * @since 2021/8/31 19:45
 */
@Service
@RequiredArgsConstructor
public class BannerService {
    private final BannerRepository bannerRepository;

    public Banner getByName(String name){
        return bannerRepository.findOneByName(name);
    }
}
